import { createRouter, createWebHistory } from "vue-router";
//导入Home组件
import Home from '../components/home/Home.vue';
//导入Home组件
import Order from '../components/order/Order.vue';
//导入Home组件
import User from '../components/user/User.vue';

const routes = [
	{
		//路由地址为空
		path : '/',
		//命令路由
		name : 'Home',
		//调用Home组件
		component : Home
	},
	{
		path : '/order',
		name : 'Order',
		component : Order,
	},
	{
		path : '/user',
		name : 'User',
		component : User,
	}
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
